import { RunDataType } from '@/typings/global';
import { request } from '@/utils/axios/request';

/**
 * 跑数据页面的请求参数
 * @param query
 * @returns
 */
export async function getRunDataBack(query: RunDataType) {
  const deleteCode = await request({
    url: '/run/data',
    method: 'post',
    data: query // 必须是对象类型的
  });
  return deleteCode.data;
}

/**
 * 轮询去问任务的进程
 * @returns
 */
export async function getRunDataProcess() {
  const deleteCode = await request({
    url: '/run/process',
    method: 'get'
  });
  return deleteCode.data;
}
